<!--
 * @Description: cron表达式引用
-->
<template>
  <el-popover
    class="_ehl_cron"
    placement="top"
    width="500"
    v-model="visible"
    :disabled="disabled"
  >
    <ehl-cron-form
      :value="value.cron"
      :config="value.config"
      @change="val => $emit('input', val)"
    />
    <div class="_ehl_cron_out" slot="reference">{{ value.cron }}</div>
  </el-popover>
</template>
<script>
  import Vue from 'vue'
  import { Popover } from 'element-ui'
  Vue.use(Popover)
  export default {
    props: {
      value: { type: Object, default: () => ({ cron: '', config: '' }) },
      disabled: { type: Boolean, default: () => false },
    },
    components: { ehlCronForm: () => $import('ehlCronForm') },
    data() {
      return { visible: false }
    },
    mounted() {},
    methods: {},
  }
</script>
